package com.javaspeak.designpatterns.go4.behavioural.observer;

/**
 * An ObservableEvent is an encapsulation of an event that has occurred in the
 * Observable which its Observers have subscribed to (are listening to).
 * <p>
 * In this example the ObservableEvent has a message in it. It could also
 * however have other attributes such as EventType.
 *
 * @author John Dickerson
 */
public class ObservableEventImpl implements ObservableEvent {

    private String message;


    /**
     * Constructor
     *
     * @param message Message for event
     */
    public ObservableEventImpl( String message ){

        this.message = message;
    }


    /* (non-Javadoc)
     * @see com.javaspeak.designpatterns.go4.behavioural.observer.
     *      ObservableEvent#getMessage()
     */
    @Override
    public String getMessage() {

        return message;
    }
}
